Skip to content

Verify sandbox state on the execution thread - #22

Open
omry wants to merge 1 commit into
pr21from
pr22
Open

Verify sandbox state on the execution thread#22
omry wants to merge 1 commit into
pr21from
pr22

Conversation

@omry
omry changed the base branch from main to pr21 August 3, 2026 13:49
@omry
omry marked this pull request as ready for review August 3, 2026 13:49
Copilot AI review requested due to automatic review settings August 3, 2026 13:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cc088b74e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// credentials and capability sets are thread-scoped. /proc/self/status
// describes the thread-group leader, which may be a different Go runtime
// thread; verify the exact thread that will exec the application instead.
const applicationKernelStatusPath = "/proc/thread-self/status"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve support for kernels without thread-self

On Linux kernels before 3.17, /proc/thread-self does not exist, so every sandboxed persistent or transient workload now fails closed while reading this path instead of launching. The repository supports Linux Docker Engine without declaring a newer kernel floor, and the previous /proc/self/status path worked on these systems; use the current TID via /proc/self/task/<tid>/status as a compatibility fallback while retaining thread-local verification.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the startup sandbox verifier to validate Linux capability/LSM state on the specific execution thread that will exec the workload (instead of the thread-group leader), and adjusts integration-test timeouts plus a changelog fragment to reflect the behavioral fix.

Changes:

  • Switch sandbox status verification from /proc/self/status to /proc/thread-self/status to make checks thread-accurate.
  • Increase Docker integration test timeouts to reduce flakiness in slower environments.
  • Add a release-note fragment describing the fix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/probe/startup_verifier.go Reads kernel sandbox status from /proc/thread-self/status and documents the thread-scoped rationale.
internal/dockerdeploy/private_workload_environment_integration_test.go Extends integration timeouts from 2m to 4m for Docker evidence runs.
.changes/unreleased/+thread-local-sandbox-verification.yaml Adds a Fixed changelog fragment for thread-local sandbox verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +12 to +16
// Sandbox setup is deliberately pinned to one OS thread because Linux
// credentials and capability sets are thread-scoped. /proc/self/status
// describes the thread-group leader, which may be a different Go runtime
// thread; verify the exact thread that will exec the application instead.
const applicationKernelStatusPath = "/proc/thread-self/status"
Comment on lines +12 to +16
// Sandbox setup is deliberately pinned to one OS thread because Linux
// credentials and capability sets are thread-scoped. /proc/self/status
// describes the thread-group leader, which may be a different Go runtime
// thread; verify the exact thread that will exec the application instead.
const applicationKernelStatusPath = "/proc/thread-self/status"
@omry

omry commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: b95c6cb098

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants